using MyTRCP.Common;
using MyTRCP.Common.Services;

namespace MyTRCP.Bridge
{
    public class Program
    {
        public static void Main(string[] args)
        {
            ThreadPool.SetMinThreads(30, 30);
            var builder = Host.CreateApplicationBuilder(args);
            builder.Services.AddSingleton<IConfigService, BridgeConfigService>();
            builder.Services.AddSingleton<DevAudioLinkService>();
            builder.Services.AddSingleton<DevCtrlLinkService>();
            builder.Services.AddHostedService<MyProtocolBridgeSideService>();

            var host = builder.Build();
            host.Run();
        }
    }
}